import {
  Entity,
  Column,
  PrimaryGeneratedColumn,
  CreateDateColumn,
  OneToMany,
  JoinColumn,
} from 'typeorm';
import { Order } from '../../order/entities/order.entity';
@Entity()
export class Girl {
  @PrimaryGeneratedColumn()
  id: number;
  @Column({ type: 'varchar', length: 255 })
  name: string;
  @Column({ type: 'int' })
  age: number;
  @Column({ type: 'varchar', length: 255 })
  skill: string;
  @CreateDateColumn({ type: 'timestamp' })
  createTime: Date;
  @OneToMany(() => Order, (order) => order.girl)
  @JoinColumn()
  order: Order[];
}
